<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8">
    <title>文件下载</title>
    <link rel="stylesheet" href="../static/layui/css/layui.css" />
    <style>
      table {
        text-align: center;
        width: 80%;
        overflow: hidden;
        font-size: 20px;
        /* 背景透明 */
        color: transparent;
        /* 文字背景 */
        -webkit-background-clip: text;
        background-image: linear-gradient(to bottom, #F7941E, #72C6EF, #00A651);
      }

      th {
        height: 50px;
      }
    </style>

  </head>
  <body>
    <div style="margin: 20px;">
      <h2><strong>文件下载</strong></h2>
      <table>
        <thead>
          <tr>
            <th style="text-align: left;">目录文件名</th>
            <th>点击下载</th>
          </tr>
        </thead>
        <tbody>
          <tr th:each="file:${files}">
            <td style="text-align: left;"><span th:text="${file}">test.txt</span></td>
            <td><a th:href="@{/downloadFile(filename=${file})}">
                <i class="layui-icon layui-icon-download-circle"></i>
              </a></td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>
